package com.chartshow.controller;

import com.chartshow.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @ClassName UserController
 * @Description TODO
 * @Author zeny
 * @Date 2020/2/26 23:56
 * @Version 1.0
 */
@Controller
public class UserController {

    @Autowired
    private UserService userService;

    @RequestMapping("/userList")
    public String userList(Model model) {
        model.addAttribute("users", userService.userList());
        return "index";
    }
}
